Skip to content
This repository has been archived by the owner on Sep 13, 2023. It is now read-only.

📝 Added template based prompting #25

Merged
merged 1 commit into from
Aug 31, 2023
Merged

📝 Added template based prompting #25

merged 1 commit into from
Aug 31, 2023

Conversation

Swiftyos
Copy link
Contributor

No description provided.

@Swiftyos Swiftyos merged commit bc731e0 into master Aug 31, 2023
1 of 3 checks passed
@github-actions
Copy link

PR Analysis

  • 🎯 Main theme: Addition of a new feature for template-based prompting
  • 📝 PR summary: This PR introduces a new feature for template-based prompting. It adds a new class, PromptEngine, which is responsible for loading and populating Jinja2 templates for prompts. The PR also includes the addition of new templates for the prompts.
  • 📌 Type of PR: Enhancement
  • 🧪 Relevant tests added: No
  • 🔒 Security concerns: No security concerns found

PR Feedback

  • 💡 General suggestions: The PR is well-structured and the code is clean. However, it would be beneficial to add some tests to ensure the new feature works as expected. Also, consider handling exceptions more specifically rather than catching a general Exception.

  • 🤖 Code feedback:

    • relevant file: autogpt/sdk/prompting.py
      suggestion: Consider using a more specific exception instead of the general Exception. This can help in identifying and handling different types of errors more effectively. [important]
      relevant line: except Exception as e:

    • relevant file: autogpt/sdk/prompting.py
      suggestion: It would be beneficial to add a check to ensure that a match is found when getting the closest match. If no match is found, the function should handle this case appropriately. [important]
      relevant line: return matches[0]

    • relevant file: autogpt/sdk/prompting.py
      suggestion: Consider adding a docstring to the load_prompt method to provide a brief explanation of its purpose and functionality. [medium]
      relevant line: def load_prompt(self, template: str, **kwargs) -> str:

    • relevant file: autogpt/sdk/prompting.py
      suggestion: It would be beneficial to add some logging in the load_prompt method to track the progress and help in debugging. [medium]
      relevant line: return template.render(**kwargs)

How to use

To invoke the PR-Agent, add a comment using one of the following commands:
/review [-i]: Request a review of your Pull Request. For an incremental review, which only considers changes since the last review, include the '-i' option.
/describe: Modify the PR title and description based on the contents of the PR.
/improve [--extended]: Suggest improvements to the code in the PR. Extended mode employs several calls, and provides a more thorough feedback.
/ask <QUESTION>: Pose a question about the PR.
/update_changelog: Update the changelog based on the PR's contents.

To edit any configuration parameter from configuration.toml, add --config_path=new_value
For example: /review --pr_reviewer.extra_instructions="focus on the file: ..."
To list the possible configuration parameters, use the /config command.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant